// components/my-LAndF/my-LAndFIndex/my-LAndFindexBody/my-LAndFindexBody.js
import eventBus from '../../../../eventBus';
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    lis:[
      {id:0,title:'笔记本',LFtype:'遗失',content:'是一本笔记本，上面记录着英语笔记，没有写名字',fromIcon:"/images/cartIcon/mine.png",fromName:'いちひめ', getTime:"2023-05-26", getAddress:"不确定",img:"/images/college-g3d5419839_1920.jpg",contact:"18312783179"},
      {id:1,title:"钥匙",LFtype:"捡拾",content:"是一串钥匙，上面的钥匙带是蓝色的，像相片里的一样",fromIcon:"/images/cartIcon/mine.png",fromName:'いちひめ', getTime:"2023-05-26", getAddress:"不确定",img:"/images/college-g3d5419839_1920.jpg",contact:"18312783179"}
    ],
    good:{}
  },

  /**
   * 组件的方法列表
   */
  methods: {
    navToGoods(e){
      console.log(e.currentTarget.dataset.id);
      this.setData({
        good:{
          id:this.data.lis[e.currentTarget.dataset.id].id,
          title:this.data.lis[e.currentTarget.dataset.id].title,
          LFtype:this.data.lis[e.currentTarget.dataset.id].LFtype,
          content:this.data.lis[e.currentTarget.dataset.id].content,
          fromName:this.data.lis[e.currentTarget.dataset.id].fromName,
          getTime:this.data.lis[e.currentTarget.dataset.id].getTime,
          getAddress:this.data.lis[e.currentTarget.dataset.id].getAddress,
          img:this.data.lis[e.currentTarget.dataset.id].img,
          contact:this.data.lis[e.currentTarget.dataset.id].contact
        }
      })
      wx.navigateTo({
        url: '/pkgInnerLAndF/pages/LAndF/LAndFCommodity/LAndFCommodity',
      })
    }
  }
})
